package com.hyk.service.impl;

import com.hyk.mapper.UserMapper;
import com.hyk.pojo.MyUser;
import com.hyk.service.UserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service("userService")
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;

    @Override
    @Transactional(rollbackFor = Exception.class)
    public MyUser findUserById(Integer id) {
        MyUser myUser = userMapper.selectUserById(id);
        return myUser;
    }
}